<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function hello(){
            console.log('你好');
        }

        t1 = setTimeout(hello, 1000);

        // 清楚定时器
        clearTimeout(1)

        // 创建多次定时器
        t2 = setInterval(hello,1000);

        // 清除
        clearInterval(2);
    </script>
</head>
<body>
    
</body>
</html>